﻿using System;
using System.Linq;
using System.ComponentModel;
using PhantomMvvmToolkit;

namespace PhantomMvvmToolkitTester
{
    public class SubINotifyPropertyChangedViewModel : IPhantomNotifyPropertyChanged
    {
        private string _string1;
        private string _string2;

        public event PropertyChangedEventHandler PropertyChanged;

        public string String1
        {
            get { return _string1; }
            set
            {
                if (_string1 != value)
                {
                    _string1 = value;
                    this.OnPropertyChanged("String1");
                }
            }
        }

        public string String2
        {
            get { return _string2; }
            set
            {
                if (_string2 != value)
                {
                    _string2 = value;
                    this.OnPropertyChanged("String2");
                }
            }
        }

        public void InvokePropertyChanged(PropertyChangedEventArgs args)
        {
            if (PropertyChanged != null)
                PropertyChanged.Invoke(this, args);
        }
    }
}
